export function useWatchRef<T>(
  value: T,
  callback: (value: T, newValue: T) => void
) {
  return customRef<T>((track, trigger) => ({
    get() {
      track();
      return value;
    },
    set(newValue) {
      value = newValue;
      callback(value, newValue);
      trigger();
    },
  }));
}
